package com.example.edu.app;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.StrictMode;
import android.provider.Settings.Secure;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.example.edu.connection.connection;

public class CourseList extends FragmentActivity implements OnClickListener {
	
		final Context context=this;
		 @Override
		 public void onCreate(Bundle savedInstanceState) {
			 super.onCreate(savedInstanceState);
			 
			 StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
			 StrictMode.setThreadPolicy(policy); 
			 
			 String android_id = Secure.getString(getBaseContext().getContentResolver(),Secure.ANDROID_ID); 
			 
			 
			 
		 }
		 
		 public void onClick(View v){
			 
			 
		 }
		 
		 private void goToMainScreen(View v){
			 Intent i=new Intent(v.getContext(),CourseListActivity.class);
			 startActivity(i);
		 }
		
		 private void showAlert(String title, String message){
			 AlertDialog.Builder alert = new AlertDialog.Builder(context);
	         alert.setTitle(title); //Set Alert dialog title here
	         alert.setMessage(message); //Message here

	         alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
	         public void onClick(DialogInterface dialog, int whichButton) {
	             dialog.cancel();

	           }
	         });

	         AlertDialog alertDialog = alert.create();
	         alertDialog.show();
		 }
}
